home *** CD-ROM | disk | FTP | other *** search
/ Take-Home Tutor en Espanol / TakeHomeTutor.iso / pc / En espanol / Take-Home Tutor 3 / flipcard_u3e2.swf / scripts / DefineButton2_164 / BUTTONCONDACTION on(release).as
Encoding:
Text File  |  2003-10-29  |  3.6 KB  |  83 lines

  1. on(release){
  2.    if(_root.activeMCList.length > 1 & _root.direction == "forward")
  3.    {
  4.       stopAllSounds();
  5.       _root.activeMCList.pop();
  6.       _root.activeMC = _root.activeMClist.shift(_root.activeMC);
  7.       _root.activeMClist.push(_root.activeMC);
  8.       _root.dynamicbuttonMc.setProperty("frontAudioInstance",_visible,false);
  9.       _root.dynamicbuttonMc.setProperty("backAudioInstance",_visible,false);
  10.       _root.dynamicbuttonMc.setProperty("frontImageHolderInstance",_visible,false);
  11.       _root.dynamicbuttonMc.setProperty("backImageHolderInstance",_visible,false);
  12.       _root.dynamicbuttonMc.question = _root.frontArray[_root.activeMC];
  13.       _root.dynamicbuttonMc.answer = _root.backArray[_root.activeMC];
  14.       _root.dynamicbuttonMc.frontAudio = _root.frontAudioArray[_root.activeMC];
  15.       _root.dynamicbuttonMc.backAudio = _root.backAudioArray[_root.activeMC];
  16.       _root.dynamicbuttonMc.frontImage = _root.frontImageArray[_root.activeMC];
  17.       _root.dynamicbuttonMc.backImage = _root.backImageArray[_root.activeMC];
  18.       _root.dynamicbuttonMc.setProperty("_root.flipcursor1",_visible,false);
  19.       _root.dynamicbuttonMc.gotoAndPlay(1);
  20.       _root.removeMC.gotoAndPlay(1);
  21.       if(_root.activeTotal > _root.passiveMC + 1)
  22.       {
  23.          _root.passiveMC += 1;
  24.          _root.activetotal -= 1;
  25.          _root.activeRemoved += 1;
  26.       }
  27.       else if(_root.passiveMC gt 1)
  28.       {
  29.          _root.passiveMC -= 1;
  30.          _root.activetotal -= 1;
  31.          _root.activeRemoved += 1;
  32.       }
  33.       else if(_root.passiveMC eq 1)
  34.       {
  35.          _root.activetotal -= 1;
  36.          _root.activeRemoved += 1;
  37.       }
  38.    }
  39.    else if(_root.activeMCList.length > 1 & _root.direction == "backward")
  40.    {
  41.       stopAllSounds();
  42.       _root.activeMCList.shift();
  43.       _root.activeMC = _root.activeMCList.shift();
  44.       _root.activeMClist.unshift(_root.activeMC);
  45.       _root.dynamicbuttonMc.setProperty("frontAudioInstance",_visible,false);
  46.       _root.dynamicbuttonMc.setProperty("backAudioInstance",_visible,false);
  47.       _root.dynamicbuttonMc.setProperty("frontImageHolderInstance",_visible,false);
  48.       _root.dynamicbuttonMc.setProperty("backImageHolderInstance",_visible,false);
  49.       _root.dynamicbuttonMc.question = _root.frontArray[_root.activeMC];
  50.       _root.dynamicbuttonMc.answer = _root.backArray[_root.activeMC];
  51.       _root.dynamicbuttonMc.frontAudio = _root.frontAudioArray[_root.activeMC];
  52.       _root.dynamicbuttonMc.backAudio = _root.backAudioArray[_root.activeMC];
  53.       _root.dynamicbuttonMc.frontImage = _root.frontImageArray[_root.activeMC];
  54.       _root.dynamicbuttonMc.backImage = _root.backImageArray[_root.activeMC];
  55.       _root.dynamicbuttonMc.setProperty("_root.flipcursor1",_visible,false);
  56.       _root.dynamicbuttonMc.gotoAndPlay(1);
  57.       _root.removeMC.gotoAndPlay(1);
  58.       if(_root.activeTotal > _root.passiveMC + 1)
  59.       {
  60.          _root.passiveMC += 1;
  61.          _root.activetotal -= 1;
  62.          _root.activeRemoved += 1;
  63.       }
  64.       else if(_root.passiveMC gt 1)
  65.       {
  66.          _root.passiveMC -= 1;
  67.          _root.activetotal -= 1;
  68.          _root.activeRemoved += 1;
  69.       }
  70.       else if(_root.passiveMC eq 1)
  71.       {
  72.          _root.activetotal -= 1;
  73.          _root.activeRemoved += 1;
  74.       }
  75.    }
  76.    else if(_root.activeTotal = 1)
  77.    {
  78.       _root.nomoreMC.gotoAndPlay(1);
  79.    }
  80.    cardlisting = "Tarjeta: <font color =\"#6868CE\">" + _root.passiveMC + "</font>" + " de " + "<font color =\"#6868CE\">" + _root.activeTotal + "</font>";
  81.    rem = "Eliminadas: <font color =\"#FF0000\">" + _root.activeRemoved + "</font>";
  82. }
  83.